package com.gxgeek.javabasic.base;

/**
 * Created by gx on 2017/7/20.
 */
public class MainTest {
    public static void main(String[] args) {
//        System.out.println(3/2);
////        Integer
//        int n=20;
//        for (int i =0;i<n;i++){
//            System.out.println("-");
//        }
        int x = 10;
        int y = 15;
        System.out.println("x="+x+" y="+y);
        x = x+y;
//x= 10+15=25
        y = x-y;
//y= 25-15=10
        x = x-y;
//x= 25-10=15
        System.out.println("x="+x+" y="+y);

        x=x+y;//25
        y=x-y;//15
        x=x-y;//10
        System.out.println("x="+x+" y="+y);



        String str="abcdefg";
        char[] strArray=str.toCharArray();
        int len=strArray.length;
        char temp;
        for(int i=0;i<len/2;i++){
            temp=strArray[i];
            strArray[i]=strArray[len-i-1];
            strArray[len-i-1]=temp;
        }
        String strAfter=String.valueOf(strArray);
        System.out.println("Before:"+str);
        System.out.println("After:"+strAfter);

    }
}
